package com.cs.study.homework._0229;

public class Demo2 {
    public static void main(String[] args) {
        String s = "peter piper picked a peck of pickled peppers";
        String[] s2 = s.split(" ");
        int count = 0;
        for (String str : s2) {
            if (str.startsWith("p")) {
                count++;
            }
        }
        System.out.println("count = " + count);
    }
}
